package demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class demo1 {
    public static void main(String[] args) throws Exception {


        AnnotationConfigApplicationContext context=
                new AnnotationConfigApplicationContext("demo");
        User user=new User();
        user.sayHello();

        User user2 = context.getBean(User.class);
        user2.sayHello();
    }
}
